package ui;

import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;

import define.Common;

import main.ErrorException;
import main.ErrorHandler;

import excelBase.ExcelData;

public class CompileHandle extends MouseAdapter 
{
	public static boolean m_isCompile = false;
	
	public void mouseClicked(MouseEvent e) 
	{
		if(Common.m_isRunning || !OpenHandle.m_isOpen)
		{
			return;
		}
		m_isCompile = true;
		try 
		{
			ExcelData.complieScript();
			Window.m_instance.addText("complie success");
		} 
		catch (ErrorException e2)
		{
			m_isCompile = false;
			new ErrorHandler(e2);
		}
	}
}
